home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Panorama
/
Panorama - Disk 14A (1987-02-11)(Pacific North-West Amigas Club)[WB].zip
/
Panorama - Disk 14A (1987-02-11)(Pacific North-West Amigas Club)[WB].adf
/
BitCalc.doc
< prev
next >
Wrap
Text File
|
1987-02-08
|
4KB
|
96 lines
BitCalc Version 1.0 - Programmer's Calculator
BitCalc is a bit-oriented, multi-function calculator tool for use on the
Amiga computer. It's capabilities include:
- Word sizes of 8, 16, or 32 bits
- Numbers can be displayed in binary, octal, decimal, or hexadecimal
- Four register stack with reverse polish notation (RPN)
- Single memory register
- 12 Numeric functions
- Full 32 digit display
- Integers only!
- Keyboard or mouse input
BitCalc can be run from either the CLI or Workbench (1.1 or 1.2). Although
I've never tried it, BitCalc should work on a 256K machine with no problem.
To use BitCalc, either double click it from the Workbench or type RUN BITCALC
from the CLI.
I have not yet done any fancy rendering of the keys, so for now most of the
keys are marked with the standard 'C' operators. The following is a summary
of the keys:
0 thru F: Digit entry keys
- : Subtract X from Y
+ : Add X to Y
* : Multiply X times Y
/ : Divide X into Y
CL: Clear X Register
RD: Roll Down
EN: Enter
<-: Clear Last Digit
XY: Swap X with Y
+-: Change Sign of X
MS: Store X to Memory
<<: Logical Shift Left X
>>: Logical Shift Right X
% : Y mod X
MR: Recall X from Memory
& : Y AND X (bitwise)
| : Y OR X (bitwise)
^ : Y XOR X (bitwise)
! : NOT X (bitwise)
2,8,10,16: Number Base
8,16,32: Word Size (bits)
? : Help Screen
This same list of keys can be obtained by selecting the ? key or by selecting
help from the project menu.
Notes about BitCalc:
- All numbers are displayed as positive values with one exception; If a 32
bit number has it's most significant bit set and the number is displayed
in base 10, then it will be shown as a negative value.
- For a given base, only the appropriate digit keys will work, i.e. in base
2, only 0 and 1 will work, in base 8, only 0 thru 7 will work, etc.
- There is no indication in the event of an overflow, any bits greater than
the word size (8, 16, or 32) are lost into the cosmic void. In other
words, if the word size is 8 bits and the base is ten, then multiplying
100 by 100 will give an answer of 16 (which is the low 8 bits of 10,000).
- Digit entry is not allowed if it would cause an overflow. For example, if
the word size is 8 bits then you can not type in a number greater than
255 decimal.
- BitCalc has a four register stack. The registers are labeled X, Y, Z, and
T. Usage is similar to Hewlett-Packard (Trademark) calculators. All two
register operations will put the result in X, copy Z to Y, and copy T to Z.
Single register operations work on the X register only. The other
registers are unaffected.
- Most BitCalc functions can be accessed using the keyboard as well as the
mouse.
- Number base conversions can be accomplished by entering a number in a
given base, and then selecting a different base. For example, select
base 10 and enter 12345. Then select base 2 to see the same number in
binary, select base 8 to see it in octal, or select base 16 to see it in
hexadecimal.
BitCalc Programmers Calculator is a copyright of John Champion. All rights
are reserved. However, BitCalc may be freely distributed so long as the
distribution is not for personal gain or profit. Please send comments, bug
reports, problems (related to BitCalc), or $5 if you think it's worth it to:
John Champion
12921 Monterey Circle
Anchorage, Alaska 99516
(Voice) 907-345-2106
BitCalc is written in Lattice C. Source code is available to supporting
users by contacting me at the above address.